package project.DAO;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
import project.DO.materialDo;

import java.util.List;

@Mapper
@Service
public interface materialDAO {
    @Insert("insert into materials(name,number) values(#{name},#{number})")
    public void insertMaterial(String name,String number);
    @Select("select * from materials where name=#{name}")
    public List<materialDo> selectMaterial(String name);
    @Select("select * from materials")
    public List<materialDo> selectAll();
}
